<?php

/**
 * This is the model metadata class for table "settleaccounts".
 */
class SettleaccountsMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'settleaccounts';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('supplier_id, dealer_id', 'numerical', 'integerOnly'=>true),
			array('order_sn, supplier_name', 'length', 'max'=>32),
			array('money, su_receivable_money, de_receivable_money', 'length', 'max'=>10),
			array('dealer_name', 'length', 'max'=>30),
			array('create_time', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, order_sn, create_time, money, supplier_id, supplier_name, su_receivable_money, dealer_id, dealer_name, de_receivable_money', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'order_sn' => '订单号',
			'create_time' => '结算时间',
			'money' => '金额',
			'supplier_id' => 'Supplier',
			'supplier_name' => '供货商名称',
			'su_receivable_money' => '供货商应收金额',
			'dealer_id' => '经销商id',
			'dealer_name' => '经销商名称',
			'de_receivable_money' => '经销商应收金额',
		);
	}
}